In a piece of software based on Qualcomm's Binary Runtime Environment for Wireless (Brew), the data diagnosis service module (DIAG module) of a Qualcomm platform provides systemic test and debugging functions for an external device and a data collection function for each module inside a system to mainly achieve a command interaction between pieces of Dual Mode Subscriber Software (DMSS)/Advanced mobile station software (AMSS) and to provide diagnosis data to be run on the DMSS/AMSS.
The handset synchronization software of a Qualcomm platform has to use an Encrypting File System (EFS) to implement the copying, deleting, moving or other management operations of a handset file system.
In a secondary callback technology based on Brew, the application layer of a piece of data synchronization software calls a callback initiate function (CALLBACK_Init) in a NEW function to register the callback of the APP in an Original Equipment Manufacturer (OEM) layer module, and the OEM layer module registers the callback of the OEM layer module in a Diag task via the registration function of Diag and then activates the callback directly using the callback queue activation function (ISHELL_Resume( )) of Brew or through the implicit call ISHELL_Resume( ) of another function, wherein the OEM layer module is an intermediate module of the data synchronization software that is located between the application layer and the service layer and responsible for data packet forwarding.
FIG. 1 is a schematic diagram showing the flow of a method for synchronizing data between a Qualcomm platform terminal and a PC side according to the prior art, as shown in FIG. 1, data synchronization between a Qualcomm platform terminal and a PC side in the prior art includes:                1) the PC side transmits a request packet to a DIAG module;        2) the DIAG module starts with a master task (diag_task) function, calls a signal processing (diag_process_sigs) function in the master task (diag_task) function to acquire a command from a queue request queue processing (diag_req_cmd_q) function, and calls a packet processing (diagpkt_process_request) function to process the command;        3) the DIAG module allocates the request packet to a corresponding sub-table according to the MASTER TABLE that is initially registered by Diag_Task, and then the sub-table maps the request packet to a corresponding function processing function (i.e. interface implementations of respective applications) according to the instruction (CMD) included in the head of the request packet or response packet processed in a corresponding DIAG module, and each field of the response packet is filled to generate the response packet;        4) command response data, which is generated after the command is processed, is submitted to a response packet queue processing function (diagpkt_rsp_q) queue by calling a diagpkt_commit function, a callback function (diag_tx_notify) is called to set a DIAG_TX_SIG semaphore, and the Diag Task is instructed to process the queue signals;        5) a rex system calls a signal waiting processing (diag_wait) function according to the semaphore DIAG_TX_SIG, determines the DIAG_TX_SIG semaphore in the diag_wait function, and in turn calls a packet content deliver (diagbuf_drain) function, a packet bonding processing (diagbuf_process_pkt_bnd) function and a response packet sending (diagpkt_rsp_send) function to transmit a response message packet;        6) the PC side receives the response message packet, and then a procedure of data transmission process is completed.        
It can be seen that current synchronization software based on a Qualcomm platform is not perfect, particularly, the development mode is not that clear, and the implementations of a bottom layer and an application layer are mixed together. Thus, it is easy to cause a fault, the code coupling degree is extremely high, and it is inconvenient for the extension of new functions.